package com.yanqu.road.entity.activity.flowercards;

import com.alibaba.fastjson.JSON;
import com.yanqu.road.utils.string.StringUtils;

import java.util.ArrayList;
import java.util.List;

public class GameResult {

    private int ret;

    /**
     * 0: 正常翻牌；1：下一轮；2：通关；3：失败
     */
    private int state;

    private int pingJia;

    private List<FlowerCard> eliminateCartLis;

    /**
     * 获得积分
     */
    private  int eliminateScore;

    /**
     * 本次开牌
     */
    private List<Integer> openCardList = new ArrayList<>();

    /**
     * 本次开牌位置
     */
    private List<Integer> openPosList = new ArrayList<>();

    /**
     * 获得美女小人花露数量
     */
    private int getFlowerDew;

    /**
     * 当前npc
     */
    private FlowerCardBeautyNpc curNpc;

    /**
     * 翻开的牌
     */
    private int cardId;

    public String getNpcString(){
        if(curNpc == null){
            return "";
        }
        return JSON.toJSONString(curNpc);
    }

    public String getEliminatePosition(){
        List<Integer> list = new ArrayList<>();
        if(eliminateCartLis != null){
            for (FlowerCard card : eliminateCartLis) {
                list.add(card.getPosition());
            }
        }
        return StringUtils.listToString(list, ",");
    }

    public GameResult(int ret) {
        this.ret = ret;
    }

    public int getRet() {
        return ret;
    }

    public void setRet(int ret) {
        this.ret = ret;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public List<FlowerCard> getEliminateCartLis() {
        return eliminateCartLis;
    }

    public void setEliminateCartLis(List<FlowerCard> eliminateCartLis) {
        this.eliminateCartLis = eliminateCartLis;
    }

    public int getPingJia() {
        return pingJia;
    }

    public void setPingJia(int pingJia) {
        this.pingJia = pingJia;
    }

    public int getEliminateScore() {
        return eliminateScore;
    }

    public void setEliminateScore(int eliminateScore) {
        this.eliminateScore = eliminateScore;
    }

    public List<Integer> getOpenCardList() {
        return openCardList;
    }

    public void setOpenCardList(List<Integer> openCardList) {
        this.openCardList = openCardList;
    }

    public List<Integer> getOpenPosList() {
        return openPosList;
    }

    public void setOpenPosList(List<Integer> openPosList) {
        this.openPosList = openPosList;
    }

    public int getGetFlowerDew() {
        return getFlowerDew;
    }

    public void setGetFlowerDew(int getFlowerDew) {
        this.getFlowerDew = getFlowerDew;
    }

    public FlowerCardBeautyNpc getCurNpc() {
        return curNpc;
    }

    public void setCurNpc(FlowerCardBeautyNpc curNpc) {
        this.curNpc = curNpc;
    }

    public int getCardId() {
        return cardId;
    }

    public void setCardId(int cardId) {
        this.cardId = cardId;
    }
}
